SELECT col7 , col1 , LAST_VALUE(col1) OVER(PARTITION BY col7 ORDER BY col1) LAST_VALUE_col1 FROM "allTypsUniq.parquet" WHERE col1 >= -65535 AND col1 <= 9223372036854775807